#ifndef TEXTCONTENT_H
#define TEXTCONTENT_H

/*
 * Parse Text Content thanh cac doan Text Va Image rieng
 */
#include "newspaper/article.h"

#include <QString>
#include <QMap>
#include <QList>

class TextData
{
public:
    enum {
        Text = 0, Image = 1
    };

    TextData(int _type, QString _data)
        :m_type(_type)
        ,m_data(_data)
    {
    }
    int type() const { return m_type; }
    QString data() const { return m_data; }

private:
    int m_type;
    QString m_data;

};

class ArticleContent
{
public:
    ArticleContent(Article* _article);

    Article* article() const { return m_article; }
    QList <TextData> listData() const { return m_listData; }

private:
    void parseData();

    Article* m_article;

    QList <TextData> m_listData;

};

#endif // TEXTCONTENT_H
